import comtypes.client

def pdf_to_docx(pdf_path, docx_path):
    word = comtypes.client.CreateObject('Word.Application')
    word.Visible = False
    doc = word.Documents.Open(pdf_path)
    doc.SaveAs(docx_path, FileFormat=16)  # 16是wdFormatXMLDocument的常量值，代表DOCX格式
    doc.Close()
    word.Quit()

if __name__ == "__main__":
    pdf_path = r'D:\d\doc\交互式电子技术手册创编与集成平台测试报告.pdf'
    docx_path = r'D:\d\doc\交互式电子技术手册创编与集成平台测试报告.docx'
    pdf_to_docx(pdf_path, docx_path)


